#ifndef AV_PLAYBAR_H
#define AV_PLAYBAR_H

#include <QGroupBox>
#include "qpushbutton.h"
#include "qlcdnumber.h"
#include "qlabel.h"
#include "IF_MediaEngineInterface.h"

class MediaPositionSlider;
class QIcon;

namespace Ui {
class MediaPlayBar;
}

class AudioVideoPlayBar : public QGroupBox
{
   Q_OBJECT

public:
   explicit AudioVideoPlayBar(IF_MediaEngineInterface &engine, MediaPositionSlider &seekbar,
                    QWidget *parent = 0);
   ~AudioVideoPlayBar();

private:
   Ui::MediaPlayBar *ui;
   IF_MediaEngineInterface & m_engine;

   QIcon  *m_playIcon;
   QIcon  *m_pauseIcon;

private slots:
   void onTotalTimeChanged(qint64 timeMs );
   void updateTime( qint64 timeMs );
   void onSateChanged(AudioObject::State newState);

   void on_bPlayPause_clicked();

private:
   void updateTotalTime( qint64 timeMs );
   void setPlaying();
   void setPaused();
};

#endif // AV_PLAYBAR_H
